<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 
        block 块级
        inline-block 行内块
        inline 行内（基本不用）
        */
        /* 块级：独占一行，宽高生效 */
        div {
            width: 100px;
            height: 100px;
            display: inline-block;
            /* 把块级转换为行内块 */
        }

        .div1 {
            background-color: red;
        }

        .div2 {
            background-color: blue;
        }

        /* 行内块：一行多个，宽高生效 */
        img {
            width: 100px;
        }

        /* 行内：一行共存多个，宽高不生效 */
        span {
            width: 100px;
        }
    </style>
</head>
<body>
    <!-- 块元素 -->
    <div class="div1">div 标签1</div>
    <div class="div2">div 标签2</div> 

    <!-- 行内元素 -->
    <span>span 标签1</span>
    <span>span 标签2</span>

    <!-- 行内块元素 -->
    <img src="./背景图/明日香.png" alt="">
    <img src="./背景图/明日香.png" alt="">
</body>
</html>